<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="css/index.css">
		<title>Sign up</title>
		<style type="text/css">
		#footer {
			font-size: 14px;
			clear: both;
			margin-top:20px;
			padding-top: 40px;
			color: #aaa;
		}
	</style>
	</head>
	<body>
		<div id="all">
			<div id="logo">
				<div id="logo_text">
					<h2>TEACHING MANAGEMENT</h2>
				</div>
			</div>
			<div id="main">
				
				<div id="register_form">
					
					<s:if test="#parameters.successsave != null ">
						<meta http-equiv= "refresh"  content= "3;URL=index.jsp">
	    				<h3><s:text name="user.text.register.success" /></h3>
	    				<s:text name="user.text.3s.later.go.to.logon" />
					</s:if>
					<s:else>
					<span>&nbsp;<b><s:text name="user.text.sign.up" /></b></span>
						<p><s:text name="user.text.You.must.be.a.teacher" /></p>
						<table>
							<s:form action="registerUser.action" theme="simple" method="post">
									<tr><td align="right"><s:text name="user.form.text.username" /></td><td><s:textfield name="user.username"  key="user.form.username"
										cssClass="textlength" ></s:textfield></td><td class="error_text"><s:if test="#request.checkusernamefailure !=  null">username is already exist .</s:if><s:property value="fieldErrors.get('user.username').get(0)"/></td>
									</tr>
									<tr><td align="right"><s:text name="user.form.text.password" /></td><td><s:password name="user.password"  key="user.form.password"
										cssClass="textlength"></s:password></td><td class="error_text"><s:property value="fieldErrors.get('user.password').get(0)"/></td>
									</tr>
									<tr><td align="right"><s:text name="user.form.text.confirm_password" /></td><td><s:password name="user.confirm_password"  key="user.form.confirm_password"
										cssClass="textlength"></s:password></td><td class="error_text"><s:property value="fieldErrors.get('user.confirm_password').get(0)"/></td>
									</tr>
									<tr><td align="right"><s:text name="user.form.text.truename" /></td><td><s:textfield name="user.name"  key="user.form.truename"
										cssClass="textlength"></s:textfield></td><td class="error_text"><s:if test="#request.checkfailure !=  null">your information is wrong ,please check it.</s:if>
										<s:property value="fieldErrors.get('user.name').get(0)"/></td>
									</tr>
									<tr><td align="right"><s:text name="user.form.text.jobnumber" /></td><td><s:textfield name="user.job_num"  key="user.form.jobnumber"
										cssClass="textlength"></s:textfield></td><td class="error_text"><s:property value="fieldErrors.get('user.job_num').get(0)"/></td>
									</tr>
									<tr><td></td><td align="right"><s:submit key="user.form.submit"/></td></tr>
							</s:form>
						</table>
						<s:text name="user.text.i.have.an.account" /><br /><a href="index.jsp"><s:text name="user.text.sign.in" /></a><br />
					</s:else>
				</div>
			</div>
				<br />
			<div id="footer">
				<div id="footer_link">
					<span class="footer_linktext"><s:text name="user.text.about" /></span>
					<span class="footer_linktext"><s:text name="user.text.contact.us" /></span>
					<span id="footer_define">
						&copy; 2010 | design All Rights Reserved.
						<img src="images/2010xhml.gif"></img>
					</span>
				</div>
			</div>
		</div>
	</body>
</html>
